In generators mechanical energy is transformed into electricity by electromagnetic induction. In electric generators the rotational power of a turbine is converted into electricity.